<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <div class="a">
    <div class="about">
   <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide"><img src="../../assets/9.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/6.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/2.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/3.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/4.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/5.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/1.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/7.jpg" alt=""></div>
      <div class="swiper-slide"><img src="../../assets/8.jpg" alt=""></div>
    </div>
    <!-- 如果需要分页器 -->
    <!-- <div class="swiper-pagination"></div> -->

    <!-- 如果需要导航按钮 -->
    <div class="swiper-button-prev"></div>
    <div class="swiper-button-next"></div>

    <!-- 如果需要滚动条 -->
   <div class="swiper-scrollbar"></div>
  </div>
  </div>
    <div class="container">
      <div class="border">
        <div @click="$router.push('/dichanliebiao')">
          <i class="el-icon-office-building"></i>
          <h3>新房</h3>
          <p>优质生活 重新出发</p>
          </div>
        <div @click="$router.push('/dichanliebiao')">
          <i class="el-icon-house"></i>
          <h3>二手房</h3>
          <p>真实房源 假一赔十</p>
          </div>
        <div @click="$router.push('/dichanliebiao')">
          <i class="el-icon-school"></i>
          <h3>租房</h3>
          <p>舒适省心 租又何妨</p>
          </div>
        <div @click="$router.push('/dichanliebiao')">
          <i class="el-icon-wallet"></i>
          <h3>卖房</h3>
          <p>足不出户 在线委托</p>
          </div>
      </div>
    </div>
  </div>
</template>

<script>
import Swiper from 'swiper'
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'About',
  data () {
    return {
    }
  },
  mounted () {
    // eslint-disable-next-line no-new
    new Swiper('.swiper-container', {
      loop: true,
      // 如果需要分页器
      // pagination: '.swiper-pagination',
      // 如果需要前进后退按钮
      nextButton: '.swiper-button-next',
      prevButton: '.swiper-button-prev',
      // 如果需要滚动条
      scrollbar: '.swiper-scrollbar',
      // 如果需要自动切换海报
      // 切换时间
      speed: 4000,
      autoplay: {
        // delay: 3000, // 时间 毫秒
        disableOnInteraction: true // 用户操作之后是否停止自动轮播默认true
      }
    })
  }
}
</script>

<style lang="scss" scoped>
.swiper-container{
  height: 500px;
  width: 100%;
  .swiper-wrapper{
    .swiper-slide{
      width: 100%;
      height: 100%;
      background-color: #42b983;
      text-align: center;
      line-height: 500px;
      img{
        width: 100%;
        height: 500px;
      }
    }
  }
}
.a{
  overflow: hidden;
  height: 800px;
  background-color: #f0f2f4;
  margin-top: 0px;
}
.container{
  /* border: 1px solid #000; */
  width: 730px;
  height: 3000px;
  // margin: 50px auto;
  .border{
    display: flex;
    justify-content: space-around;
    margin-top: 60px;
    width: 100vw;
    height: 180px;
    div{
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      border-radius: 10px;
      cursor:pointer;
      height: 200px;
      width: 220px;
      background-color: #fff;
      i,h3,p{
        margin: 0;
        padding: 0;
      }
      i{
        font-size: 26px;
      }
      p{
        font-size: 12px;
      }
    }
    div:hover{
      color: #5183e6;
    }
  }
}

</style>
